<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ page
	language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<jsp:include page="../defaults/tagHeadContent.jsp" />
<!--<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript"
	src="http://dev.jquery.com/view/trunk/plugins/validate/lib/jquery.delegate.js"></script>
<script type="text/javascript"
	src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
<script type="text/javascript">
	jQuery.validator.setDefaults({
		debug : true,
		success : "valid"
	});;
</script>

<script>
	$(document).ready(function() {
		$("#newUserForm").validate({
			rules : {
				"user.name" : "required",
				"user.email" : {
					required : true,
					email : true
				},
				"user.login" : "required",
				"user.password" : "required",
				"passwordConfirmation" : {
					required : true,
					equalTo : "#password"
				}
			}
		});
	});
</script> -->


</head>
<body>
	<jsp:include page="../defaults/header.jsp" />
	<div id="wrapper">
		<div id="content">
			<jsp:include page="../defaults/sidebar.jsp" />
			<div id="newform">
				<form id="newUserForm" action="<c:url value="/user/new"/>"
					method="POST">
					<fieldset>
						<legend>Criar novo usuário</legend>
						<label for="name">Nome:</label> <input id="name" type="text"
							name="user.name" value="${user.name }" /> <br /> <label
							for="email">Email:</label> <input id="email" type="text"
							name="user.email" value="${user.email }" /> <br /> <label
							for="login">Login:</label> <input id="login" type="text"
							name="user.login" value="${user.login }" /><br /> <label
							for="password">Senha:</label> <input id="password"
							type="password" name="user.password" /><br /> <label
							for="passwordConfirmation">Confirme a senha:</label> <input
							id="passwordConfirmation" type="password"
							name="passwordConfirmation" /><br />
						<c:if test="${webUser.administrator}">
				Tipo de acesso: <br />
							<input id="regularUser" type="radio" name="user.administrator"
								value="false" checked="checked" />Usuário<br />
							<input id="admin" type="radio" name="user.administrator"
								value="true">Administrador			    
				</c:if>

						<br /> <input type="submit" value="Enviar" />
					</fieldset>
				</form>
			</div>
		</div>
		<div style="clear: both;">&nbsp;</div>
	</div>

	<jsp:include page="../defaults/footer.jsp" />
	<br />

</body>
</html>
